<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Hello MUI</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <script src="js/ext/jquery-1.11.3.js"></script>
</head>
<body>
<a href="view/test1.html">test1</a><br>
<a href="view/pullrefresh_with_tab.html">pullrefresh_with_tab.html</a><br>
<a href="view/pullrefresh_with_tab1.html">pullrefresh_with_tab1.html</a><br>
<a href="view/pullrefresh_main.html">pullrefresh_main.html</a><br>
<a href="view/slider-default.html">slider-default.html</a><br>
<a href="view/imageviewer.html">imageviewer.html</a><br>
<a href="view/detail.html">detail.html</a><br>
<input type="button" name="" id="dianji" value="dianji">
<script>
    $('#dianji').click(function () {
        $.ajax({
//            url: 'http://localhost:8080/api/dianji',//这种可以跨域cookie
            url: 'http://192.168.0.104:8080/api/dianji',//这种不行
            type: 'get',
            crossDomain: true,
            xhrFields: {
                withCredentials: true
            },
            dataType: "json",
            success: function (res) {
                console.log(res)
            },
            error: function () {
                alert('系统错误，请刷新后重试！')
            }
        });
    })
</script>
</body>
</html>